<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) 
{
    ob_start("ob_gzhandler");
}
//load config
include("includes/config/config.php");

//create object db
include("includes/class_mysql.php");
include "language/language.php";

header("Cache-Control: max-age=30240, public, must-revalidate", true);
header("Etag: \"1c18bb3-381ce-495c4816b8bbc\"");
header("content-type: application/rss+xml"); 

echo ListPhotosHome();

function ListPhotosHome()
{
    global $dbsql,$language,$folder_img_upload;
	
	$str= '<?xml version="1.0" encoding="utf-8" standalone="yes"?>';
	$str.= '<images>';
    
    $sql_select = "select * from tblbackground order by iOrder";
    $rs         = $dbsql->query($sql_select);
    while($result   = $dbsql->fetch_array($rs))
    {
        $str.= '<pic>';
		$str.= '<image>http://'.$_SERVER['HTTP_HOST']."/".$folder_img_upload.$result['cImage'].'</image>';
		//echo '<caption>'.$result['cTitleImages'].'&nbsp;</caption>';
		//echo '<thumb>http://'.$_SERVER['HTTP_HOST'].'/images/gallery/'.$result['cThumb'].'</thumb>';
		//echo '<description>'.$result['cNameImages'].'</description>';
		$str.= '</pic>';
    }	
	$str.= '</images>';
	return $str;
}
?>